﻿@model IEnumerable<MvcCoffeeShop.DataTransferObjects.CartItemDTO>
@{
    ViewBag.Title = "Check Out";
}

<h2>Check Out</h2>


@using (Html.BeginForm())
 {
            <table style="border-width:1px;border-style:solid;">
     
                 @foreach (var item in Model)
                    {
                       <tr>
                        <td>
                            <h3>@item.ProductName</h3>
                        </td>
                        <td>
                            <h3>@item.UnitPrice </h3>
                        </td>
                        <td>
                           <h3> @item.Quantity </h3>
                        </td>
                        <td>
                           <h3> $@(item.Quantity * item.UnitPrice) </h3>
                        </td>
                       </tr>
                    }
        
              </table>
        <h2>Total: $@ViewBag.TotalPrice</h2>
}

@if (Session[MvcCoffeeShop.SharedConstants.cSession_MvcShoppingCartItemsCount] != null)
      {
         <h3>@Html.ActionLink("Continue Shopping", "Catalog", "Home")</h3>
         <h3>@Html.ActionLink("Pay Now", "PayNow", "ShoppingCart")</h3>
      }